home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crosscountry USA Photo Safari
/
Crosscountry USA Photo Safari.iso
/
Data
/
cc_base
/
pak00_16bit_f.pk3
/
commodity_viewer_actor.c4
< prev
next >
Wrap
Text File
|
2003-01-17
|
2KB
|
71 lines
{
@loaded {
ResByName("gui/laptop/map_button/big_blue_dot.pcx");
ResByName("gui/laptop/map_button/red_dot.pcx");
}
@draw {
DrawTextStr(
ResByName("font/verdana_9_black.tf"),
ResPropGetInt(SELF, "ScreenX") + ResPropGetInt(SELF,"city_text_x"),
ResPropGetInt(SELF, "ScreenY") + ResPropGetInt(SELF,"city_text_y"),
"%s",
ResPropGetStr(SELF, "city_name")
);
}
@updateCommodity {
resid commodity_drawer_id;
resid font_id;
str cur_commodity;
str com1;
str com2;
str com3;
int selected;
int x;
int y;
resid player_id;
player_id = ResPropGetResID(ResByName("Game"), "game_cur_player");
ResPropSetInt(SELF, "Hidden", TRUE);
commodity_drawer_id = ResByName("country_map.gl/commodity_drawer");
cur_commodity = ResPropGetStr(commodity_drawer_id, "cur_commodity");
com1 = ResPropGetStr(SELF, "com1");
com2 = ResPropGetStr(SELF, "com2");
com3 = ResPropGetStr(SELF, "com3");
selected = 0;
if (StrExact(cur_commodity, "")) {
selected = 0;
} else if (StrExact(com1, cur_commodity)) {
selected = 1;
} else if (StrExact(com2, cur_commodity)) {
selected = 1;
} else if (StrExact(com3, cur_commodity)) {
selected = 1;
}
if (selected) {
ResPropSetResID( SELF, "AnimationID", ResByName("gui/laptop/map_button/red_dot.pcx"));
ResPropSetInt( SELF, "Hidden", FALSE );
stop;
}
if (player_id == ResByName("Player1")) {
if (ResPropGetInt(SELF, "is_player1_dest")) {
ResPropSetResID(SELF, "AnimationID", ResByName("gui/laptop/map_button/big_blue_dot.pcx"));
ResPropSetInt(SELF, "Hidden", FALSE);
stop;
}
}
if (player_id == ResByName("Player2")) {
if (ResPropGetInt(SELF, "is_player2_dest")) {
ResPropSetResID(SELF, "AnimationID", ResByName("gui/laptop/map_button/big_blue_dot.pcx"));
ResPropSetInt(SELF, "Hidden", FALSE);
stop;
}
}
}
}